
def Max_sub(num):
    max_count=0
    count=1
    for i in range(len(num)-1):
        if num[i+1]==num[i]:
            count=count+1
        else:
            if count>max_count:
                max_count=count
                count=1
        if count > max_count:
            max_count = count
            count = 1
    return max_count

if __name__=='__main__':
    nums=[1,1,0,1,1,1,4,5,6,7,7,7,7]
    a=Max_sub(nums)
    print(a)